using System;
using System.Collections.Generic;
using System.Security.Permissions;
using System.Data;
using Microsoft.Dynamics.Framework.Reports;
public partial class Demo_PaperSizes
{
    [DataMethod(), AxSessionPermission(SecurityAction.Assert)]
    public static System.Data.DataTable GetDotNetMethods()
    {
        return SampleCodeReportLibrary.SampleCode.GetDotNETMethodNames();
    }

    [DataMethod(), AxSessionPermission(SecurityAction.Assert)]
    public static System.Data.DataTable GetFillerData()
    {
        int num_rows = 100;
        int num_cols = 20;

        var dt = new System.Data.DataTable();
        for (int i = 0; i < num_cols; i++)
        {
            dt.Columns.Add(string.Format("Col{0:00}", i), typeof(string));
        }

        var rand = new System.Random();
        dt.BeginLoadData();

        var obj_array = new object[num_cols];
        for (int r = 0; r < num_rows; r++)
        {
            for (int c = 0; c < num_cols; c++)
            {
                obj_array[c] = string.Format("{0:0.0}", rand.NextDouble() * 10.0);
            }
            dt.Rows.Add(obj_array);
        }
        dt.EndLoadData();

        return dt;
    }
}
